A virtual machine (VM) is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. A VM image includes an operating system and all computer memories attached to a virtual machine when the image is created. A VM image that contains only a generalized operating system is basically the same as an original type of image, an operating system (OS) image.
A hypervisor or virtual machine monitor (VMM) is computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems. Multiple instances of a variety of operating systems may share the virtualized hardware resources. This contrasts with operating-system-level virtualization, where all instances (usually called containers) must share a single kernel, though the guest operating systems can differ in user space.
Cloud computing is a model of service delivery for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, virtual machine images, and services) for data handling and processing. Computer program memories used within cloud structures may be categorized as “read-only,” wherein values of variables can be altered at run time; or “read-only,” containing static constants rather than variables.
Virtual machines generally segment computer memories into different, discrete segments for differential processing of machine instructions (code or text) and associated data within a package: conventionally, the machine instructions into a code segment, and the associated data into a data segment, a Basic Service Set (BSS) segment, a stack segment and a heap segment.
The code segment, also known as a text segment or simply as text, is where a portion of an object file or the corresponding section of the program's virtual address space that contains executable instructions (machine code, etc.) is stored.
The data segment (sometimes denoted as “.data”) is a portion of an object file or a corresponding virtual address space of a program that contains initialized static variables which have a pre-defined value and can be modified, and any variables that are not defined within a function (and thus can be accessed from anywhere) or are defined in a function but are defined as static so they retain their address across subsequent calls. The values for these variables are initially stored within read-only memory areas and copied into the .data segment during the start-up routine of the program. The size of a data segment is determined by the size of the values in program source code, and does not change at run time. Data segment regions within memory are generally of read-only type and of fixed size.
The Basic Service Set (BSS) segment, also known as uninitialized data, is usually adjacent to the data segment. The BSS segment contains all global variables and static variables that are initialized to zero or do not have explicit initialization in source code. For instance, a variable defined as static “int i;” would be contained in the BSS segment.
The heap is an area of memory used for dynamic allocations, meaning that blocks of memory can be allocated and freed in an arbitrary order and accessed multiple times (as opposed to the stack, which is Last-In-First-Out (LIFO). Heap segments commonly begin at the end of the BSS and data segments and grows to larger addresses from there.) The heap area is managed to adjust its size and shared by all threads, shared libraries, and dynamically loaded modules in a process.
The stack area contains the program stack, a LIFO structure, typically located in the higher parts of memory. A “stack pointer” register tracks the top of the stack; it is adjusted each time a value is “pushed” onto the stack. The set of values pushed for one function call is termed a “stack frame”. A stack frame consists at minimum of a return address. Automatic variables are also allocated on the stack. The stack area conventionally adjoins the heap area and they grow towards each other; thus, when the stack pointer meets the heap pointer, free memory is generally exhausted within the memory. Within large address spaces and virtual machine implementations stack and heap areas tend to be placed more freely, but still typically grow in a converging direction relative to each other.